package com.mentalhealthplatform.global.rbac.repository;

import com.mentalhealthplatform.global.rbac.model.Role;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;
import java.util.Optional;

public interface RoleRepository extends JpaRepository<Role, Long> {
    Optional<Role> findByIdentifier(String identifier);

    List<Role> findByStatus(boolean isStatus);

    // 模糊查询角色名称
    Page<Role> findByDisplayName(String displayName, Pageable pageable);

}

